/**
 Created by PhpStorm.
 User: ZT
 Date: 2020/7/1 0001
 Time: 16:25
 **/
'use strict';

var publicApi = function publicAction() {
    this.comment = function (data) {
        return Fetch({
            url: '/comment',
            method: 'POST',
            data: data
        });
    };
    this.getComment = function (article_id) {
        return Fetch({
            url: '/comment/'+article_id,
            method: 'get',
        });
    };
    this.getMessage = function () {
        return Fetch({
            url: '/message',
            method: 'get',
        });
    }
    this.getSubcomment = function (target_id,article_id) {
        return Fetch({
            url: '/subComment/'+article_id+'/'+target_id,
            method: 'get',
        });
    };
    this.getNewArticleList = function (data) {
        return Fetch({
            url: '/article/list',
            method: 'get',
            params:data
        });
    }
};
if (window.API === undefined) {
    window.API = {};
}
window.API.publicApi = new publicApi();